# -*- coding:utf-8 -*-
# File Name:get_resource_list.py
# Author:jing
# Date:2018/12/18

__author__ = 'jing'

import sys

sys.path.append('../src')
import requests
from ygframe.scope.scope import Scope

from api.v1.resource import Resource
from config import LOCAL_HOST, PORT


def get_list():
    resp = requests.get('http://{}:{}/{}/{}/api/v1/resource'.format(
        LOCAL_HOST, PORT,
        Scope.get_system_name(), Scope.get_subsystem_name()
    ), params=Resource.__get_request_sample__[0][0])

    print(resp.json())


if __name__ == '__main__':
    get_list()
